from Libs import MysqlModel


class Target():

    @staticmethod
    def select():
        MysqlApi = MysqlModel.mysql()
        data = MysqlApi.select("select * from target ")

        print(data)

    @staticmethod
    def insert(openPort):
        MysqlApi = MysqlModel.mysql()

        # SQL 插入语句

        sql = "INSERT INTO EMPLOYEE(`host`,  `port`, `status`  " \
              "VALUES (%s, %s, %s, %s )" % (openPort[0], openPort[1], openPort[2])

        MysqlApi.insert(sql)



    @staticmethod
    def delete():
        MysqlApi = MysqlModel.mysql()

        # SQL 插入语句
        sql = "DELETE FROM EMPLOYEE WHERE AGE = %s" % (20)

        MysqlApi.insert(sql)
